
struct file_descriptor
{
char file_name[20];
//char Location_path[30];
char file_type[5];
unsigned long int file_size;
unsigned long int start_block_address;
unsigned long int descriptor_address;
unsigned int dir_descriptors;
};

struct file_descriptor_list
{
struct file_descriptor fdescriptor;
char fpath[100];
struct file_descriptor_list *next;
struct file_descriptor_list *prev;
};

struct file_descriptor_list *FDList;

void create_file(char *,char *,char *);
void list_files();
void file_content();
void make_dir_disk(char *,char *);
struct file_descriptor traverse_path(char *);
void test();

void listfile(char *, char *);
void print_descriptor(struct file_descriptor);
void print_narry(int, char[]);
void initailizeFDList();

unsigned long int make_dir_dummy(char *);


////////////////OPERATION FUNCTIONS//////////////
void make_dir(char *path,char*name);
void add_file(char*, char*, char*);
//void list_dir(char *);
void copy_file(char *,char *, char*);
void move_file(char *,char *, char*);
void export_file(char *,char *);
void remove_file(char *);
void delete_dir(char *);
void move_dir(char *,char *);
void update_file(char *,char *);

void write_data(char*, unsigned long int);
unsigned long int write_data_multiple_blocks();
void read_data(unsigned long int);
void write_cpy(unsigned long int, struct file_descriptor *);
void addfile_cpy(char *,struct file_descriptor *, char*);

void make_dir_rec(char *, char*);

void display_DS();

///////////////validation functions////////////

int make_dir_validate(char* ,char*);
int delete_dir_validate(char*);
int move_dir_validate(char *,char *);
int list_dir_validate(char *, int  ,char *);
int copy_file_validate(char *, char *, char *);
int export_file_validate(char *, char *);
int search_file_validate(char *, char *);
int remove_file_validate(char *);
int move_file_validate(char*, char*, char* );
int update_file_validate(char*, char*);
int add_file_validate(char *, char *, char *);
int list_file_validate(char *, char *);
int checkslash( char*);
void makeBSTpath(char*, char*, char*);